home *** CD-ROM | disk | FTP | other *** search
-
- > But surely it isn't that hard to do Doom movement? Wall colision can be
- > handled by the same routine as player collision, I think, and working out
- > the direction to move isn't that hard, is it?
-
- Unfortunately, there's quite a difference between bumping into walls and
- actually avoiding them in the first place. Path finding algorithms are needed
- to prevent monsters from trying to walk through walls to get to their target
- (normally this is either the object's enemy or the 2-sided linedef forming the
- exit from that sector and entrance to another).
-
- > Are the line of sight test routines still (at least partially) valid? The AI
- > guys wanted LOS routines for their algo's...
-
- 2 dimensional LOS can be calculated fairly easily because the walls are simple
- lines. You only have to intersect the projected line of sight with the wall
- segments between you and your target. Usually, the blockmap can be filled with
- close-proximity walls to make wall checks a lot less intensive.
-
- Unfortunately, 3D LOS is not so easy because you then have to intersect the
- (previously 2D) line of sight against the floors and ceilings. This
- is to ensure a monster can't see through a very high step or closed door. There
- is probably a way to make this simple, but I haven't spent any time thinking
- about it in detail.
-
- >I also wonder whether it would be OK to use the routines in Wolf3D.
-
- I don't think there's much in Wolf we can use to be honest. All the hard
- bits are going to be just as hard because they are system-specific, and Wolf
- & Doom both use different systems. Wolf can use simple grid-maps to track
- the environment and LOS is reducable to intersections against horizontal and
- vertical lines. There are also no height differences, so most of it is
- actually quite trivial. The only thing that stops them just using a block
- map for the whole game is the fact that secret walls can slide very smoothly
- between start and end positions. Otherwise it would just be a ray-casted
- version of Dungeon Master!
-
- The only thing you could get out of it is ideas for how to make the guys
- 'react' to different situations. From what I remember of Wolf, there's not
- much of this either. We're probably much better off making it up as we go
- along. It's worked for me so far... :)))
-
- The most difficult bits will be the intelligence 'decision' logic - it's the
- hardest part to write and by far the hardest to test. The actual 2D & 3D algos
- are insular components and can be written & checked without too many problems.
-
- I wrote a (non-trivial) 2D line intersection routine for a reverse painter
- algorithm last year - this may come in handy for BM. Unfortunatly, the equations
- needed for solving a non-trivial 3D line against an arbitrary plane is a little
- more complex to reduce into code. I haven't written one of these yet, and we may
- need this for perfect LOS.
-
- BTW, 'non-trivial' means it is not restricted to requiring at least one vertical
- or horizontal line in order to work. It relies on simultaneous equations. This
- is why a 3D version is a bit of a minor nightmare in assembly language, and still
- relatively obnoxious in 'C'.
-
- I think we may get away with 3D intersections against an axial plane (flat floor)
- and 2D intersections for the walls if the floor test fails. Some internal/external
- checks should sort out the final answer from these two results.
-
- Ignore me if I'm jabbering - I'm just thinking on my feet, and besides, it's about
- 7.00 in the morning and I've been working all night! I need some sleep!
-
- :)
-
- Doug.
-
-